package com.fuhan.service;

import com.fuhan.mapper.MapDataMapper;
import com.fuhan.pojo.MapData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Random;

/**
 * @Author: Chao
 * @description:
 * @Date: 2021/3/25 17:39
 */
@Service
public class MapDataService {
    @Autowired
    private MapDataMapper mapDataMapper;

    public MapData getMapData(){
        Random random = new Random();
        int randomNum = random.nextInt(10) + 1;
        return mapDataMapper.getMap(randomNum);
    }
}
